Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Spec Namespace / IPdfDictExt Class / TryGet Method / TryGet<T>(IPdfDict,PdfName,T,Boolean,Boolean) Method
The current dictionary.
The key identifying the value.
OUT: The value.
OUT: Indicates whether the value is PDF null.
Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if errors occur.

In This Topic
    TryGet<T>(IPdfDict,PdfName,T,Boolean,Boolean) Method
    In This Topic
    Tries to get the value associated with the specified key, Returns true if value exists and can be converted to a T, resolves a PDF reference if needed. Note! The method does not resolve reference if T is IPdfRef, otherwise the method resolves the reference and returns *actual* object.
    Syntax
    'Declaration
     
    Public Overloads Shared Function TryGet(Of T As IPdfObject)( _
       ByVal dict As IPdfDict, _
       ByVal key As PdfName, _
       ByRef value As T, _
       ByRef isNull As System.Boolean, _
       ByVal addWarning As System.Boolean _
    ) As System.Boolean
    public static System.bool TryGet<T>( 
       IPdfDict dict,
       PdfName key,
       out T value,
       out System.bool isNull,
       System.bool addWarning
    )
    where T: IPdfObject

    Parameters

    dict
    The current dictionary.
    key
    The key identifying the value.
    value
    OUT: The value.
    isNull
    OUT: Indicates whether the value is PDF null.
    addWarning
    Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if errors occur.

    Type Parameters

    T

    Return Value

    Returns true if no errors occur.
    See Also